package com.eselect.properties;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Component;

@ConfigurationProperties(prefix = "rabbitmq")
@EnableConfigurationProperties(RabbitMQProperties.class)
@Data
@Slf4j
@Component
public class RabbitMQProperties implements InitializingBean {
    private String virtualHost;
    private String host;
    private String username;
    private String password;
    private String exchange;
    private String errorExchange;
    private String errorRoutingKey;

    @Override
    public void afterPropertiesSet() throws Exception {
        log.debug("Properties 'RabbitMQProperties' configured for use");
    }
}
